package com.xiaow.springsecuriydemo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author xiaow
 * @since 2022-09-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Goods implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 商品名称
     */
    private String name;

    /**
     * 创建时间
     */
    private LocalDateTime ctime;

    /**
     * 总数
     */
    private Integer size;

    /**
     * 剩余
     */
    private Integer remaining;

    /**
     * 店铺id
     */
    private Integer shopid;

    /**
     * 封面
     */
    private String img;
    /**
     * 价格
     */
    private Double money;


    /**
     * 商品属性   0正常商品  1秒杀商品
     */
    private Integer state;


    public static void main(String[] args) {
        Goods goods = new Goods();
        goods.setCtime(LocalDateTime.now());
        LocalDateTime ctime = goods.getCtime();
        System.out.println(ctime.getHour());
        System.out.println(ctime.getMonth().getValue());
        System.out.println(ctime.getYear());
        System.out.println(ctime.getDayOfMonth());
        System.out.println(ctime.getMinute());
    }


}
